package com.newthread.jdp.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.newthread.jdp.dao.PushDAO;
import com.newthread.jdp.model.Message;
import com.newthread.jdp.model.Tag;
import com.newthread.jdp.model.UserInfo;
import com.newthread.jdp.service.PushService;

@Service
public class PushServiceImpl implements PushService {
	private PushDAO pushDAO;

	@Override
	public String queryBindList(UserInfo userInfo) {

		return pushDAO.queryBindList(userInfo);
	}

	@Override
	public void pushMessage(List<UserInfo> userInfo, Message message) {
		pushDAO.pushMessage(userInfo, message);
	}

	@Override
	public void pushBroadcastMessage(Message message) {
		pushDAO.pushBroadcastMessage(message);
	}

	@Override
	public void pushTagMessage(Tag tag, Message message) {
		pushDAO.pushTagMessage(tag, message);
	}

	public PushDAO getPushDAO() {
		return pushDAO;
	}

	@Resource
	public void setPushDAO(PushDAO pushDAO) {
		this.pushDAO = pushDAO;
	}


}
